#include<bits/stdc++.h>
using namespace std;
int main(){
	vector<string> list;
	char ch;
	string temp;
	while((ch = getchar())!='\n'){
		if(ch!=' '){
			temp += ch;
		}
		else{
			list.push_back(temp);
			temp = "";
		}
	}
	list.push_back(temp);
	vector<string>::reverse_iterator it;
	cout << *list.rbegin();
	for(it = list.rbegin()+1;it < list.rend();it++){
		cout << " " << *it;
	}
	return 0;
}
